<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<!--流程实例选择-->
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'center',border:false">
		<table id="dom_choosegridIdentityactruexecution">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th field="KEY" data-options="sortable:false" width="80">
						键[KEY]
					</th>
					<th field="VALUE" data-options="sortable:false" width="80">
						值[VALUE]
					</th>
				</tr>
			</thead>
		</table>
	</div>
</div>
<script type="text/javascript">
	var choosegridVariableActruexecution;
	var chooseSearchIdentityActruexecution;
	var toolbar_chooseIdentityactruexecution = [ {
		text : '修改',
		iconCls : 'icon-edit',
		handler : function() {
			var selectedArray = $(choosegridVariableActruexecution).datagrid('getSelections');
			if (selectedArray.length == 1) {
				$.messager.prompt('提示信息', '请输入变量值：', function(r){
					if (r){
						$.post("admin/ActRuExecutionVariableeditCommit.do", {processInId:'${ids}',value:r,key:selectedArray[0].KEY},
								function(flag) {
									if (flag.pageset.commitType == 0) {
										$(choosegridVariableActruexecution).datagrid('reload');
									} else {
										var str = MESSAGE_PLAT.ERROR_SUBMIT
												+ flag.pageset.message;
										$.messager.alert(MESSAGE_PLAT.ERROR, str,
												'error');
									}
								});
					}
				});
			} else {
				$.messager.alert(MESSAGE_PLAT.PROMPT, MESSAGE_PLAT.CHOOSE_ONE_ONLY,
						'info');
			}
		}
	}];
	$(function() {
		//初始化数据表格
		choosegridVariableActruexecution = $(
				'#dom_choosegridIdentityactruexecution').datagrid( {
			url : "admin/ActRuExecutionParavarQueryAll.do?ids=${ids}",
			fit : true,
			fitColumns : true,
			'toolbar' : toolbar_chooseIdentityactruexecution,
			pagination : true,
			closable : true,
			checkOnSelect : true,
			striped : true,
			rownumbers : true,
			ctrlSelect : true
		});
	});
	//-->
</script>
